
<!DOCTYPE html>
<html>
<head>
    <title>大乐透数据分析</title>
<style>

body {
    width: 600px;
    margin: 40px auto;
    font-family: 'trebuchet MS', 'Lucida sans', Arial;
    font-size: 14px;
    color: #444;
}

table {
    *border-collapse: collapse; /* IE7 and lower */
    border-spacing: 0;
    width: 100%;    
}

.bordered {
    border: solid #ccc 1px;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    -webkit-box-shadow: 0 1px 1px #ccc; 
    -moz-box-shadow: 0 1px 1px #ccc; 
    box-shadow: 0 1px 1px #ccc;         
}

.bordered tr:hover {
    background: #fbf8e9;
    -o-transition: all 0.1s ease-in-out;
    -webkit-transition: all 0.1s ease-in-out;
    -moz-transition: all 0.1s ease-in-out;
    -ms-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;     
}    
    
.bordered td, .bordered th {
    border-left: 1px solid #ccc;
    border-top: 1px solid #ccc;
    padding: 10px;
    text-align: left;    
}

.bordered th {
    background-color: #dce9f9;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#ebf3fc), to(#dce9f9));
    background-image: -webkit-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:    -moz-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:     -ms-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:      -o-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:         linear-gradient(top, #ebf3fc, #dce9f9);
    -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; 
    -moz-box-shadow:0 1px 0 rgba(255,255,255,.8) inset;  
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;        
    border-top: none;
    text-shadow: 0 1px 0 rgba(255,255,255,.5); 
}

.bordered td:first-child, .bordered th:first-child {
    border-left: none;
}

.bordered th:first-child {
    -moz-border-radius: 6px 0 0 0;
    -webkit-border-radius: 6px 0 0 0;
    border-radius: 6px 0 0 0;
}

.bordered th:last-child {
    -moz-border-radius: 0 6px 0 0;
    -webkit-border-radius: 0 6px 0 0;
    border-radius: 0 6px 0 0;
}

.bordered th:only-child{
    -moz-border-radius: 6px 6px 0 0;
    -webkit-border-radius: 6px 6px 0 0;
    border-radius: 6px 6px 0 0;
}

.bordered tr:last-child td:first-child {
    -moz-border-radius: 0 0 0 6px;
    -webkit-border-radius: 0 0 0 6px;
    border-radius: 0 0 0 6px;
}

.bordered tr:last-child td:last-child {
    -moz-border-radius: 0 0 6px 0;
    -webkit-border-radius: 0 0 6px 0;
    border-radius: 0 0 6px 0;
}

</style>
</head>

<body>
<form name="total_count" method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" >
<?php

require_once 'configure.php';

$th_title_array=array("名称","注释");
$source_array=array();
$source_array[]=array("期号","<input type='text' name='issue'>");
$source_array[]=array("龙头","<textarea rows='5' cols='100' name='red_one'></textarea>");
$source_array[]=array("第二个红球","<textarea rows='5' cols='100'name='red_two'></textarea>");
$source_array[]=array("第三个红球","<textarea rows='5' cols='100'name='red_three'></textarea>");
$source_array[]=array("第四个红球","<textarea rows='5' cols='100'name='red_four'></textarea>");
$source_array[]=array("凤尾","<textarea rows='5' cols='100' name='red_five'></textarea>");
$source_array[]=array("前区和值","<textarea rows='5' cols='100' name='before_total'></textarea>");
$source_array[]=array("第一个蓝球","<textarea rows='5' cols='100' name='blue_one'></textarea>");
$source_array[]=array("第二个蓝球","<textarea rows='5' cols='100' name='blue_two'></textarea>");
$source_array[]=array("后区和值","<textarea rows='5' cols='100' name='after_total'></textarea>");
$source_array[]=array("",show_submit());

$show_table=show_multi_index_table(2,"bordered",$th_title_array,$source_array,"multi_2_array");

echo $show_table;

if($_SERVER['REQUEST_METHOD'] == 'POST'){
    $sql_text  = "insert into forecast_comment (issue,r_comment_1,r_comment_2,r_comment_3,r_comment_4,r_comment_5,";
    $sql_text .= "r_before_comment,b_comment_1,b_comment_2,b_after_comment)values(";
    $sql_text .= $_POST['issue'].",'".$_POST['red_one']."','".$_POST['red_two']."','".$_POST['red_three']."','".$_POST['red_four']."',";
	$sql_text .= "'".$_POST['red_five']."','".$_POST['before_total']."','".$_POST['blue_one']."','".$_POST['blue_two']."','".$_POST['after_total']."')";
	mysql_insert($sql_text);
}

?>
</form>
</body>
</html>